package database;
import database.DBUtil;
import java.sql.*;


public class ADD{
public static void add(String number,String name,String gender,String birthdate,String politics,String address,String telephone,String dormitory){
	String str = "insert into students(number,name,gender,birthdate,politics,address,telephone,dormitory)"
			+ " values("+"'"+number+"'"+"," + "'"+name+"'"+"," +"'"+ gender+"'"+"," +"'"+ birthdate+"'"+"," +"'"+ politics+"'" +","+"'"+ address+"'"+"," +"'"+telephone+"'"+"," +"'"+ dormitory+"'"+")";
	try {
		DBUtil.exec(str);
	} catch (ClassNotFoundException e) {
		// TODO Auto-generated catch block
		e.printStackTrace();
	} catch (SQLException e) {
		// TODO Auto-generated catch block
		e.printStackTrace();
	}
}
}




